package com.zc.zby.basicframedemo.greendao.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.jude.easyrecyclerview.adapter.BaseViewHolder;
import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter;
import com.zc.zby.basicframedemo.R;
import com.zc.zby.basicframedemo.greendao.bean.UserInfo;
import com.zc.zby.basicframedemo.utils.AdapterViewUtil;
import com.zc.zby.basicframedemo.viewholder.UserViewHolder;

import java.util.List;


/**
 * Created by zby on 2018/7/19.
 */

public class UserAdapter extends RecyclerArrayAdapter<UserInfo> {

    public UserAdapter(Context context) {
        super(context);
    }

    @Override
    public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
        View view = AdapterViewUtil.getItemLayouts(parent.getContext(), viewType, R.layout.item_user);
        return new UserViewHolder(view);
    }
}
